package com.pz.cloud.framework.business.workflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pz.cloud.framework.business.workflow.entity.WaitDone;
import com.pz.cloud.framework.business.workflow.entity.WaitDoneUser;
import com.pz.cloud.framework.business.workflow.model.ProcessRecordModel;

import java.util.List;

public interface IWaitDoneService extends IService<WaitDone> {

    List<WaitDoneUser> getUserByWaitDoneId(String waitDoneId);

    /**
     * 根据业务id获取当前任务处理人
     * @param bizId
     * @return
     */
    List<WaitDoneUser> getCurUserByBizId(String bizId);

    IPage<WaitDone> findPage(WaitDone waitDone);

    List<WaitDone> findList(WaitDone waitDone);

    List<WaitDone> findByTaskKeyAndProcInstanceId(String id, String processInstanceId);

    IPage<ProcessRecordModel> findByProcInstanceId(String processInstanceId);

    IPage<ProcessRecordModel> findByBizId(String bizId);

    void deleteWaitDone(WaitDone waitDone);

    void deleteProcess(String id);

    void deleteByBizId(String bizId);

    List<WaitDone> findByParentId(String parentId);

    IPage<WaitDone> findHasDonePage(WaitDone entity);

    boolean updateStatusByBizId(String bizId,Integer status);

    List<ProcessRecordModel> findSignleRecordByBizId(String bizId) ;

}
